#ifndef NAVI_DWB_CONTROLLER__DWB_CONTROLLER_HPP_
#define NAVI_DWB_CONTROLLER__DWB_CONTROLLER_HPP_

#include <string>
#include <vector>
#include <memory>

#include "navi_core/controller.hpp"
#include "rclcpp/rclcpp.hpp"

namespace navi_dwb_controller
{

    class DwbController : public navi_core::Controller
    {
    public:
        DwbController() = default;
        ~DwbController() override = default;

        void configure(
            const rclcpp_lifecycle::LifecycleNode::WeakPtr &parent,
            std::string name) override;

        void cleanup() override;
        void activate() override;
        void deactivate() override;

        void setPlan() override;
        /**
         * 设置速度限制
         * @param speed_limit 限速值
         * @param percentage  是否为百分比形式的速度限制
         */
        void setSpeedLimit(const double &speed_limit, const bool &percentage) override;

    protected:
        rclcpp::Logger logger_{rclcpp::get_logger("DwbController")};
        rclcpp_lifecycle::LifecycleNode::WeakPtr node_;
    };

} // namespace nav_controller

#endif // NAVI_DWB_CONTROLLER__DWB_CONTROLLER_HPP_